package org.xxs.inanword.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import org.xxs.inanword.common.AnWord;
import org.xxs.inanword.mapper.AnWordMapper;
import org.xxs.inanword.service.AnWordService;
import reactor.core.publisher.Mono;

import java.util.List;

@Service
public class AnWordServiceImpl extends ServiceImpl<AnWordMapper, AnWord> implements AnWordService {
    @Autowired
    private WebClient wc;

    @Override
    public Mono<String> sendRequest(String url) {
        return wc.get()
                .uri(url)
                .retrieve()
                .bodyToMono(String.class);
    }
}
